package com.nononsenseapps.feeder.ui.rule

import androidx.fragment.app.viewModels
import androidx.lifecycle.ViewModelProvider
import androidx.lifecycle.lifecycleScope
import cn.ekuma.odbo.mobile.base.I_BrowsableEditableData
import cn.ekuma.odbo.mobile.ui.AbstractOdboBrowseAbleEditorFragment
import cn.ekuma.odbo.mobile.ui.EditorRecordHolder
import com.nononsenseapps.feeder.db.entity.FeedRule

class FeedRuleBrowseAbleEditorFragment : AbstractOdboBrowseAbleEditorFragment<FeedRule>() {

    private val feedRuleViewModel:FeedRuleEditorViewModel  by viewModels()

    override fun onCreateEditorRecordHolder(): EditorRecordHolder<FeedRule> =FeedRuleEditorHolder(lifecycleScope,requireContext(),feedRuleViewModel::loadSubscribeFeeds)

    override fun buildBrowAble(): I_BrowsableEditableData<FeedRule> {
        return feedRuleViewModel
    }

}

